package com.artPreter.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 位置表
 * </p>
 *
 * @author Jarvis_He
 * @since 2024-04-18
 */
@Data
@TableName("jv_position")
public class Position implements Serializable {

    private static final long serialVersionUID = 1L;

    //ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //地点名称")
    @TableField("posi_name")
    private String posiName;

    //随机id")
    @TableField("uuid")
    private String uuid;

    //创建人ID")
    @TableField("create_user")
    private Integer createUser;

    //创建时间")
    @TableField("create_time")
    private Integer createTime;

    //修改时间")
    @TableField("update_time")
    private Integer updateTime;

    //排序")
    @TableField("sort")
    private Integer sort;

    //1:启用")
    @TableField("status")
    private Integer status;

    //面积
    @TableField("area")
    private Integer area;

    //是否室内
    @TableField("indoor")
    private Integer indoor;

    public Position() {
    }

    /**
     * 修改
     * @param area
     * @param sort
     * @param posiName
     */
    public Position(Integer area, Integer sort, String posiName) {
        if(area!=null){
            this.area = area;
        }
        if(sort!=null){
            this.sort = sort;
        }
        if(posiName!=null&&!posiName.isEmpty()){
            this.posiName = posiName;
        }
    }
}
